import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int start = scanner.nextInt();
        int end = scanner.nextInt();
        method(start,end);
    }

//判断一个数是否是素数

    public static boolean isPrime(int num){

        for(int i=2;i<num;i++){
            if(num%i==0){
                return false;
            }
        }
        return true;
    }
    public static void method(int start, int end) {
        int count=0;
        if(start>end){
            int temp=start;
            start=end;
            end=temp;
        }

        for(int i=start;i<=end;i++){
            if(i<=2){
                continue;
            }
            if(isPrime(i)){
                count++;
            }
        }
        System.out.println(start+"到"+end+"之间有"+count+"个大于2的素数");
    }
}